<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>Parallel S2E</title>
<link rel="stylesheet" href="../s2e.css" type="text/css" />
</head>
<body>
<div class="document" id="parallel-s2e">
<h1 class="title">Parallel S2E</h1>

<p>S2E can be run in multi-process mode in order to speed up path exploration.
Each process is called a worker. Each worker periodically checks whether there
are processor cores available, and if yes, forks itself. The child worker inherits half of the states of the parent.</p>
<p>To enable multi-process mode, append <tt class="docutils literal"><span class="pre">-s2e-max-processes</span> XX</tt> to the command line,
where <tt class="docutils literal">XX</tt> is the maximum number of S2E instances you would like to have.</p>
<p>Add the <tt class="docutils literal"><span class="pre">-nographic</span></tt> option as it is not possible to fork a new S2E window for now.</p>
<div class="section" id="how-do-i-process-generated-traces">
<h1>How do I process generated traces?</h1>
<p>In multi-process mode, S2E outputs traces in the <tt class="docutils literal"><span class="pre">s2e-last/XX</span></tt> folders, where <tt class="docutils literal">XX</tt> is the sequence number of the S2E instance.
S2E increments this number each time it launches a new instance. Note that instances can also terminate, e.g., when they
finish exploring their respective state subtree.</p>
<p>Each trace file contains a subtree of the global execution tree. Therefore, analysis tools must process the traces in the relative order
of their creation. The relative order is defined by the sequence number of the instance. This can be done by specifying
multiple <tt class="docutils literal"><span class="pre">-trace</span></tt> arguments to the offline analysis tools. For example, generating the fork profile of a multi-core run can be done
as follows:</p>
<pre class="literal-block">
$ /home/s2e/tools/Release/bin/forkprofiler -outputdir=s2e-last/ \
-trace=s2e-last/0/ExecutionTracer.dat -trace=s2e-last/1/ExecutionTracer.dat \
-trace=s2e-last/2/ExecutionTracer.dat -trace=s2e-last/3/ExecutionTracer.dat
</pre>
</div>
<div class="section" id="limitations">
<h1>Limitations</h1>
<ul class="simple">
<li>S2E can only run on a shared-memory architecture. S2E cannot start on one machine and fork new instances on other machines for now.
This limitation will be removed soon.</li>
<li>It is not possible to have a separate S2E window for each process for now. If you start with <tt class="docutils literal"><span class="pre">-nographic</span></tt>, you will not be able
to manipulate the console. To start the program that you want to symbolically execute in the guest, use the <a class="reference external" href="../UsingS2EGet.html">HostFiles</a> plugin or
the <tt class="docutils literal"><span class="pre">-vnc</span> :1</tt> option.</li>
<li>Because S2E uses the <tt class="docutils literal">fork</tt> system call, S2E cannot run on Windows in multi-core mode.</li>
</ul>
</div>
</div>
<div class="footer">
<hr class="footer" />
<a class="reference external" href="Parallel.rst">View document source</a>.

</div>
</body>
</html>
